/*
包含了n个接口请求的函数的模块
函数返回值为: promise
 */

import ajax from "./ajax";

// 注册接口
// export const reqRegister = (user) => ajax('/register', user, 'POST')
//获取推荐列表
export const reqPersonalizedList = () => ajax("/personalized");
//排行榜
export const reqTopList = idx => ajax("/top/list", { idx });

export const reqRecommend = id => ajax("/playlist/detail", { id });
//搜索
export const reqSearch = (keywords, offset, limit) =>
  ajax("/search", { keywords, offset, limit });
//热词
export const reqSearchHot = () => ajax("/search/hot");

//歌词
export const reqSongMp3Url = id => ajax("/song/url", { id });

//音频
export const reqSongLyric = id => ajax("/lyric", { id });

// Personalized: 'personalized',
// Album: 'top/album?offset=0&limit=8',
// TopList: 'top/list?idx=',
// HotPlayList: 'top/playlist?limit=6&order=new',//精选歌单,
// Search: 'search?keywords=',
// SearchHot: 'search/hot',
// SongMp3Url: 'song/url?id=',
// SongLyric: 'lyric?id=',
// PlayListDetail: 'playlist/detail?id=',
